#include "roud_clock.h"
#include "image.h"
round_clock::round_clock(void):
m_angle(0.0f)
{
	m_back_image=NULL;
	m_point_image=NULL;
}

round_clock::~round_clock(void)
{
	if (m_back_image)
	{
		delete m_back_image;
		m_back_image=NULL;
	}
	if (m_point_image)
	{
		delete m_point_image;
		m_point_image=NULL;
	}
}

void round_clock::render()
{
	if (m_back_image)
	{
		m_back_image->render();
	}
	if (m_point_image)
	{
		m_point_image->render();
	}


}

void round_clock::set_angle( float an )
{
	m_angle=an;
	if (m_point_image)
	{
	   m_point_image->set_rotate(an);
	}

}

void round_clock::set_pos( float x,float y )
{
	m_x=x;
	m_y=y;
}

void round_clock::load_image( image* back,image* point )
{
	
	m_back_image=back;
	m_point_image=point;

}
